<?php

 class Circle{
       private  $radus;
       public  $r;

       public  function  __construct($r)
        {
         $this->r=$r;
        }
       public  function  __clone()
       {
           $this->r=10;
       }
       public  function  toString(){
           return 'circle.r='.$this->r;
       }
       private  function d(){
           echo  'd......';
       }
       private  function  c(){
           echo  'c......';
       }
         public  function  call($methidName,$args){
          die( "你所调用的方法".$methidName."不存在！");
         }
     public  function  getArea(){
        return 3.14*$this->r*$this->r;
    }
    public  function  __set($name,$value)
    {
        if($name=='r'&& $value<0){
            $this->radus=0;
        }
        else{
            $this->$name=$value;
        }
    }
    public  function  __get($name)
    {
        if($name=='r')
        {
            return  $this->radus;
        }
        else{
          return  $this->$name;
        }

    }
    public  function  getArea2(){}
    public  function  __sleep()
    {
        return array("r");
    }


 }
 $c=new  Circle(3);
echo $c;
print $c;
$e=$c->getArea2();


